﻿<%@ Page Title="" Language="C#" MasterPageFile="../MasterPage2.master" AutoEventWireup="true" CodeFile="LiberarCertificado.aspx.cs" Inherits="Congresso_Salao_relatorios_LiberarCertificado" %>

<%@ Register assembly="DevExpress.XtraReports.v9.1.Web, Version=9.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.XtraReports.Web" tagprefix="dxxr" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <style type="text/css">
        #ctl00_ContentPlaceHolder1_divErro {
            background:#F3F3F3;
            width:90%;
            margin:0 auto;
            margin-bottom:15px;
            padding:10px;
            text-align:center;

            box-shadow:0px 0px 1em #c3c3c3;
            border-radius:7px;
            }
                
        #ctl00_ContentPlaceHolder1_btnPesquisarInscrito {
            margin-top:2px;
            width:80px;
            height:23px;
            border:none;
            outline:none;
            background-color:#B0E2FF;
            color:White;
            text-align:center;
                
            border-radius:7px;
            }
                
         #ctl00_ContentPlaceHolder1_txtbNomeInscrito {
            margin-top:2px;
            width:95%;
            height:17px;
            border:2px solid #B0E2FF;
            outline:none;
                
            border-radius:7px;
            }
            
            #ctl00_ContentPlaceHolder1_divAvisoSemGridView{
                background:#F3F3F3;
                width:90%;
                margin:0 auto;
                margin-bottom:15px;
                padding:10px;
                text-align:center;

                box-shadow:0px 0px 1em #c3c3c3;
                border-radius:7px;
            }
          
    </style>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
        
        <div id="divPesquisaAluno" runat="server" style="width:100%; float:left; margin-top:15px; text-align:center">
            <div style="float:left; width:100%;">
                <asp:TextBox runat="server" ID="txtbNomeInscrito" Width="400px" placeholder="Nome do Inscrito..."></asp:TextBox>    
                <asp:Button runat="server" ID="btnPesquisarInscrito" Text="Pesquisar" OnClick="btnPesquisar_Click"/>
            </div>
        </div>

        <div runat="server" id="divGrid" style="width:100%; margin-top:15px; margin-bottom:15px; float:left;">
            
           <asp:GridView ID="gridViewInscritos" runat="server" HeaderStyle-BackColor="#3AC0F2" AlternatingRowStyle-BackColor="AliceBlue" EnableModelValidation="true"
                             AllowSorting="true" AllowPaging="true" HeaderStyle-ForeColor="White" AutoGenerateColumns="false" DataKeyNames="CodInscrito"
                             onpageindexchanging="grdItens_PageIndexChanging" PageSize="20">
                <Columns>
                    <asp:BoundField DataField="CodInscrito" HeaderText="CodInscrito" ItemStyle-Width="50" >
                        <ItemStyle Width="50px"></ItemStyle>
                    </asp:BoundField>
                    <asp:BoundField DataField="Nome" HeaderText="Nome" ItemStyle-Width="500" >
                        <ItemStyle Width="500px" Font-Bold="true"></ItemStyle>
                    </asp:BoundField>
                    <asp:TemplateField HeaderText="Certificado Liberado" ItemStyle-HorizontalAlign="Center">
                        <ItemTemplate>
                            <asp:CheckBox ID="chkRow" runat="server" Checked ='<%# bool.Parse(Eval("CertificadoLiberado").ToString()) %>' 
                                          AutoPostBack="true" OnCheckedChanged="chkview_CheckedChanged"/>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
                <HeaderStyle BackColor="#87CEEB" ForeColor="White"></HeaderStyle>
                <PagerStyle HorizontalAlign="Center" />
                <PagerSettings Position="Bottom" Mode="NextPreviousFirstLast"
                               PreviousPageText="<img src='../figuras/prev.png' border='0' title='Página Anterior'/>"
                               NextPageText="<img src='../figuras/next.png' border='0' title='Próxima Página'/>"
                               FirstPageText="<img src='../figuras/prevprev.png' border='0' title='Primeira Página'/>"
                               LastPageText="<img src='../figuras/nextnext.png' border='0' title='Última Página'/>"/>
            </asp:GridView>

            <div runat="server" id="divAvisoSemGridView" visible="false">
                <p>Não foram encontrados registros para esta pesquisa...</p>
            </div>

            <div runat="server" id="divErro" visible="false">
                <h2>AVISO</h2>
                <p>Atenção! Não foi possível realizar a operação desejada. Favor entrar em contato com o suporte.</p>
                <asp:Label runat="server" ID="lblErro" ForeColor="Red"></asp:Label>
                <p><a href="LiberarCertificado.aspx">CLIQUE AQUI</a> para voltar</p>
            </div>

        </div>
</asp:Content>
